﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Home_LanguageChange : System.Web.UI.Page
{
    public UserEntity currentUser;
    protected void Page_Load(object sender, EventArgs e)
    {
        //Check login
        currentUser = UserManager.Instance.Getuser();
        if (!currentUser.isLogin)
            Response.Redirect("~/Login.aspx");
        try
        {
            string lg = Request.QueryString["lg"].ToString();
            (new LanguageManage()).ChangeLanguage(lg);

            Response.Redirect(Request.UrlReferrer.AbsoluteUri);
        }
        catch { }
    }
}
